﻿using System;

namespace Sencha.Serialization.Bson
{
	public interface IBsonReader : IJsonReader
	{
		new BsonToken Token { get; }
		new object RawValue { get; }
		new IBsonValueInfo Value { get; }
		long BytesReaded { get; }
	}

	public interface IBsonValueInfo : IValueInfo
	{
		new object Raw { get; }
		new Type RawType { get; }
		BsonBinary AsBinary { get; }
		BsonDateTime AsBsonDateTime { get; }
		BsonJavaScript AsJavaScript { get; }
		BsonJavaScriptWithScope AsJavaScriptWithScope { get; }
		BsonObjectId AsObjectId { get; }
		BsonRegex AsRegex { get; }
		BsonSymbol AsSymbol { get; }
		BsonTimestamp AsTimestamp { get; }
	
		void CopyBsonTo(IBsonWriter writer);
	}
}
